Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

feature/firmware/src/commonMain/kotlin/org/meshtastic/feature/firmware/FirmwareUpdateHandler.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 1.79 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.firmware

Tff7b72import T7ee787org.meshtastic.core.common.util.CommonUri
Tff7b72import T7ee787org.meshtastic.core.database.entity.FirmwareRelease
Tff7b72import T7ee787org.meshtastic.core.model.DeviceHardware

T8b949e/** Common interface for all firmware update handlers (BLE DFU, ESP32 OTA, USB). */
Tff7b72interface T56d364FirmwareUpdateHandler Tb4b4b4{
T8b949e/**
* Start the firmware update process.
*
* @param release The firmware release to install
* @param hardware The target device hardware
* @param target The target identifier (e.g., Bluetooth address, IP address, or empty for USB)
* @param updateState Callback to report back state changes
* @param firmwareUri Optional URI for a local firmware file (bypasses download)
* @return A host-owned temporary artifact when cleanup is required, or null if the update used only external input
*/
Tff7b72suspend Tff7b72fun Td2a8ffstartUpdateTb4b4b4(
Te6edf3releaseTb4b4b4: Te6edf3FirmwareReleaseTb4b4b4,
Te6edf3hardwareTb4b4b4: Te6edf3DeviceHardwareTb4b4b4,
Te6edf3targetTb4b4b4: Tffa657StringTb4b4b4,
Te6edf3updateStateTb4b4b4: Tb4b4b4(Te6edf3FirmwareUpdateStateTb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Te6edf3firmwareUriTb4b4b4: Te6edf3CommonUri? Tff7b72= Tff7b72nullTb4b4b4,
Tb4b4b4)Tb4b4b4: Te6edf3FirmwareArtifact?
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s